<template>
  <div>
    <swiper :options="swiperOption">
      <!-- slides -->
      <swiper-slide v-for="item of swiperList" :key="item.id">
        <img class="swiper-img" :src="item.imgUrl" alt="">
      </swiper-slide>

      <swiper-slide>I'm Slide 3</swiper-slide>

      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: 'HomeSwiper',
  data (){
    return{
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true
      },
      swiperList: [{
        id: '0001',
        imgUrl: '//fuss10.elemecdn.com/2/7a/946aba678f06545c946a8fe8fedf0jpeg.jpeg?imageMogr/format/webp/'
      },{
        id: '0002',
        imgUrl: '//fuss10.elemecdn.com/2/7a/946aba678f06545c946a8fe8fedf0jpeg.jpeg?imageMogr/format/webp/'
      }

      ]
    }
  }
}
</script>

<style lang="stylus" scoped>
  .wrapper >>> .swiper-pagination-bullet-active
    background: #fff
  .swiper
    overflower: hidden
    width: 100%
    height: 0
    padding-bottom: 20%
    background: #eee
    .swiper-img
      width: 100%;
</style>
